package com.github.rxyor.common.support.aspect.crypto;

import lombok.AllArgsConstructor;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

/**
 *<p>
 *
 *</p>
 *
 * @author liuyang
 * @date 2019/12/2 周一 20:48:00
 * @since 1.0.0
 */
@Aspect
@AllArgsConstructor
public class CryptoApiAspect {

    private final CryptoApiResolver cryptoAPIResolver;

    @Pointcut("@annotation(com.github.rxyor.common.support.annotations.CryptoApi)")
    public void pc() {
    }

    @Around("pc()")
    public Object process(ProceedingJoinPoint joinPoint) throws Throwable {
        return cryptoAPIResolver.processJoinPoint(joinPoint);
    }
}
